------------------------------------------------------------------------------------------------------
       log:  C:\DATA\electoral_enep.log
  log type:  text
 opened on:  18 May 2005, 10:27:06

.  #delimit ;
delimiter now ;
. *     ***************************************************************** *;
. *     ***************************************************************** *;
. *       File-Name:      electoral_enep.do                               *;
. *       Date:           5/18/05                                         *;
. *       Author:         MRG                                             *;
. *       Purpose:        Do-file to indicate that the effective number   *;
. *                       of parties in presidential regimes using        *;
. *                       runoffs is significantly higher than in         *;
. *                       presidential regimes employing plurality rule.  *;
. *                       This result is mentioned in the conclusion of   *;
. *                       the AJPS paper.                                 *;
. *       Input File:     legislative_newp.dta                            *;
. *       Output File:    electoral.log                                   *;
. *       Data Output:    None                                            *;
. *       Previous file:                                                  *;
. *       Machine:        Home                                            *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. set mem 10m;
(10240k)

. set matsize 150;

. use c:\ajps\legislative_newp.dta;

. *     ****************************************************************  *;
. *                           Summary Statistics                          *;
. *     ****************************************************************  *;
. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       867     100.083    39.39866          3        199
        year |       867    1978.435    16.12735       1946       2000
 institution |       867    1.720877    .8967816          1          3
     legelec |       867           1           0          1          1
-------------+--------------------------------------------------------
    preselec |       867    .2226067    .4162364          0          1
      regime |       867    .0207612    .1426664          0          1
  regime_leg |       867           0           0          0          0
    eighties |       867    .0784314    .2690044          0          1
    nineties |       867    .1314879    .3381282          0          1
-------------+--------------------------------------------------------
         old |       867    .8662053    .3406281          0          1
      avemag |       843     11.2979    27.15588          1        150
   districts |       844    92.96682    141.6076          1        659
        eneg |       708    1.941652    1.227505   1.004012   14.22434
        enep |       791    3.878951    1.857447          1      14.89
-------------+--------------------------------------------------------
 enep_others |       788    3.154099    7.559339          0       69.3
       enep1 |       788    4.273211    3.811859          1      57.56
        enpp |       826    3.573923    3.853006          1      52.42
 enpp_others |       815    1.599509    6.055805          0         86
       enpp1 |       814    3.934066    7.452793          1     178.65
-------------+--------------------------------------------------------
      enpres |       858    1.186659    1.595493          0       6.57
      medmag |       702    12.72009    29.69172          1        150
      newdem |       867    .1534025    .3605831          0          1
  proximity1 |       867    .2918454    .4175579          0          1
  proximity2 |       867    .2214533    .4154646          0          1
-------------+--------------------------------------------------------
       seats |       860     201.943    163.7675         10        672
  upperseats |       817    14.89229    45.95744          0        344
   uppertier |       817    5.632791    12.65088          0      77.95
twoelections |       867    .0207612    .1426664          0          1
twoelectio~1 |       867    .0103806    .1014136          0          1
-------------+--------------------------------------------------------
pres_plura~y |       867    .0968858     .295973          0          1
 pres_runoff |       867    .2064591    .4049974          0          1
pres_major~y |       867    .0588235    .2354299          0          1
pres_qualm~y |       867    .0403691    .1969369          0          1
    pres_stv |       867    .0034602    .0587556          0          1
-------------+--------------------------------------------------------
pres_college |       867    .0230681    .1502063          0          1

. *     ****************************************************************  *;
. *                    Relabel and Define Variables                       *;
. *     ****************************************************************  *;
. label var country  "countryname";

. label var newdem "first election as new democracy";

. label var countrynumber "countrynumber";

. label var year "year";

. label var regime "regime as of 31 December of given year 0=democracy 1=dictatorship";

. label var regime_leg "regime type at time of legislative election 0 = democracy 1=dictatorship";

. label var legelec "legislative election";

. label var preselec "presidential election";

. label var eighties "election in 1980s closest to 1985";

. label var old "elections in countries that did not transition to democracy in 1990s";

. label var nineties "elections in 1990s closest to 1995";

. label var proximity1 "proximity - continuous";

. label var proximity2 "proximity - dichotomous";

. label var enpp "parliamentary parties - uncorrected";

. label var enpp1 "parliamentary parties - corrected";

. label var enep "electoral parties - uncorrected";

. label var enep1 "electoral parties - corrected";

. label var enpres "effective number of presidential candidates";

. label var seats "assembly size";

. label var districts "number of electoral districts";

. label var avemag "average district magnitude";

. label var medmag "median district magnitude";

. label var upperseats "number of uppertier seats";

. label var uppertier "percentage of uppertier seats";

. label var eneg "effective number of ethnic groups  fearon";

. describe;

Contains data from c:\ajps\legislative_newp.dta
  obs:           867                          
 vars:            36                          24 May 2004 14:36
 size:        96,237 (99.1% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
country         str31  %31s                   countryname
countrynumber   int    %8.0g                  countrynumber
year            int    %8.0g                  year
institution     byte   %8.0g                  
legelec         byte   %8.0g                  legislative election
preselec        byte   %8.0g                  presidential election
regime          byte   %8.0g                  regime as of 31 December of
                                                given year 0=democracy
                                                1=dictatorship
regime_leg      byte   %8.0g                  regime type at time of
                                                legislative election 0 =
                                                democracy 1=dictatorship
eighties        byte   %8.0g                  election in 1980s closest to
                                                1985
nineties        byte   %8.0g                  elections in 1990s closest to
                                                1995
old             byte   %8.0g                  elections in countries that did
                                                not transition to democracy in
                                                1990s
avemag          float  %9.0g                  average district magnitude
districts       int    %8.0g                  number of electoral districts
eneg            float  %9.0g                  effective number of ethnic
                                                groups  fearon
enep            float  %9.0g                  electoral parties - uncorrected
enep_others     float  %9.0g                  
enep1           float  %9.0g                  electoral parties - corrected
enpp            float  %9.0g                  parliamentary parties -
                                                uncorrected
enpp_others     float  %9.0g                  
enpp1           float  %9.0g                  parliamentary parties -
                                                corrected
enpres          float  %9.0g                  effective number of
                                                presidential candidates
medmag          float  %9.0g                  median district magnitude
newdem          byte   %8.0g                  first election as new democracy
proximity1      float  %9.0g                  proximity - continuous
proximity2      byte   %8.0g                  proximity - dichotomous
seats           int    %8.0g                  assembly size
upperseats      int    %8.0g                  number of uppertier seats
uppertier       float  %9.0g                  percentage of uppertier seats
twoelections    byte   %8.0g                  
twoelections1   byte   %8.0g                  
pres_plurality  byte   %8.0g                  
pres_runoff     byte   %8.0g                  
pres_majority   byte   %8.0g                  
pres_qualmajo~y byte   %8.0g                  
pres_stv        byte   %8.0g                  
pres_college    byte   %8.0g                  
-------------------------------------------------------------------------------
Sorted by:  

. *     ****************************************************************  *;
. *       Would like to drop countries that have no recognizable parties  *;
. *       since I am interested in determining the number of parties.     *;
. *       Drop Kiribati, Marshall Islands, Micronesia, Nauru, Palau,      *;
. *       Lebanon (at least no votes by party), Kyrgzstan.                *;
. *       Since I am interested in competitive elections I drop the       *;
. *       elections that occurred in Colombia between 1958 and 1970 due   *;
. *       to a constitutional agreement to share power between the        *;
. *       conservative and liberal parties.                               *;
. *       Also drop the Congolese elections of 1963.  Although there were *;
. *       multiple parties permitted, all candidates ran on a single list.*;
. *       Thus, there was no actual competition in this election.         *;
. *     ****************************************************************  *;
. drop if countrynumber==163;
(6 observations deleted)

. drop if countrynumber==165;
(2 observations deleted)

. drop if countrynumber==197;
(3 observations deleted)

. drop if countrynumber==189;
(5 observations deleted)

. drop if countrynumber==146;
(12 observations deleted)

. drop if countrynumber==198;
(2 observations deleted)

. drop if countrynumber==167;
(8 observations deleted)

. drop if countrynumber==70 & year==1958;
(1 observation deleted)

. drop if countrynumber==70 & year==1960;
(1 observation deleted)

. drop if countrynumber==70 & year==1962;
(1 observation deleted)

. drop if countrynumber==70 & year==1964;
(1 observation deleted)

. drop if countrynumber==70 & year==1966;
(1 observation deleted)

. drop if countrynumber==70 & year==1968;
(1 observation deleted)

. drop if countrynumber==70 & year==1970;
(1 observation deleted)

. drop if countrynumber==12 & year==1963;
(1 observation deleted)

. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       821     97.3715    37.35025          3        199
        year |       821     1978.35    16.15197       1946       2000
 institution |       821    1.719854    .8927666          1          3
     legelec |       821           1           0          1          1
-------------+--------------------------------------------------------
    preselec |       821    .2180268    .4131574          0          1
      regime |       821    .0207065    .1424866          0          1
  regime_leg |       821           0           0          0          0
    eighties |       821    .0803898    .2720614          0          1
    nineties |       821    .1315469    .3382035          0          1
-------------+--------------------------------------------------------
         old |       821    .8733252    .3328111          0          1
      avemag |       804    11.72699    27.73206          1        150
   districts |       805    96.60373    143.9838          1        659
        eneg |       690    1.889245    1.181049   1.004012   14.22434
        enep |       782    3.878018    1.860428       1.23      14.89
-------------+--------------------------------------------------------
 enep_others |       779    3.171412    7.596386          0       69.3
       enep1 |       779    4.276418    3.829688       1.23      57.56
        enpp |       808     3.23625    1.470687          1      10.87
 enpp_others |       797    1.440527    4.762796          0       54.1
       enpp1 |       796    3.322802    1.756047          1      20.94
-------------+--------------------------------------------------------
      enpres |       815     1.21214    1.616311          0       6.57
      medmag |       664    13.30422    30.42178          1        150
      newdem |       821    .1534714     .360661          0          1
  proximity1 |       821    .2911449    .4150291          0          1
  proximity2 |       821    .2168088    .4123225          0          1
-------------+--------------------------------------------------------
       seats |       814    210.0037    164.1061         11        672
  upperseats |       778    15.61954    46.97577          0        344
   uppertier |       778    5.883021    12.88335          0      77.95
twoelections |       821    .0219245    .1465263          0          1
twoelectio~1 |       821    .0109622    .1041887          0          1
-------------+--------------------------------------------------------
pres_plura~y |       821     .090134    .2865482          0          1
 pres_runoff |       821    .2131547    .4097857          0          1
pres_major~y |       821    .0572473    .2324561          0          1
pres_qualm~y |       821    .0426309    .2021468          0          1
    pres_stv |       821    .0036541    .0603752          0          1
-------------+--------------------------------------------------------
pres_college |       821    .0243605    .1542598          0          1

. *     ****************************************************************  *;
. *       Would like to drop certain countries that do not fit.           *;
. *       1. Drop Kiribati - not free entry of candidates                 *;
. *       2. Drop elections that ultimately use an electoral college      *;
. *       to determine who wins.  This means dropping Argentina 1946,     *;
. *       1958, 1963, 1983, 1989, United States (all presidential         *;
. *       elections), Finland 1950, 1956, 1962, 1968, 1978, 1982.         *;
. *       3. Drop Ireland (all presidential elections) and Sri Lanka      *;
. *       1994, 1999 since they use STV.                                  *;
. *     ****************************************************************  *;
. drop if countrynumber==163;
(0 observations deleted)

. drop if countrynumber==65;
(28 observations deleted)

. drop if countrynumber==113;
(16 observations deleted)

. drop if countrynumber==96;
(10 observations deleted)

. drop if countrynumber==66 & year==1946;
(1 observation deleted)

. drop if countrynumber==66 & year==1958;
(1 observation deleted)

. drop if countrynumber==66 & year==1963;
(1 observation deleted)

. drop if countrynumber==66 & year==1983;
(1 observation deleted)

. drop if countrynumber==66 & year==1989;
(1 observation deleted)

. drop if countrynumber==106 & year==1950;
(0 observations deleted)

. drop if countrynumber==106 & year==1956;
(0 observations deleted)

. drop if countrynumber==106 & year==1962;
(1 observation deleted)

. drop if countrynumber==106 & year==1968;
(0 observations deleted)

. drop if countrynumber==106 & year==1978;
(0 observations deleted)

. drop if countrynumber==106 & year==1982;
(0 observations deleted)

. *     ****************************************************************  *;
. *       Drop those countries where enep1 others are greater than 15% of *;
. *       the vote or seats.                                              *;
. *     ****************************************************************  *;
. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       761    98.44678    38.12704          3        199
        year |       761    1978.833    16.08063       1946       2000
 institution |       761    1.684625    .8783283          1          3
     legelec |       761           1           0          1          1
-------------+--------------------------------------------------------
    preselec |       761    .2049934    .4039623          0          1
      regime |       761     .021025    .1435618          0          1
  regime_leg |       761           0           0          0          0
    eighties |       761    .0827858    .2757394          0          1
    nineties |       761    .1379763     .345102          0          1
-------------+--------------------------------------------------------
         old |       761    .8633377    .3437164          0          1
      avemag |       744    12.43278    28.70134          1        150
   districts |       745    85.69664     133.563          1        659
        eneg |       630    1.910976    1.229548   1.004012   14.22434
        enep |       722     3.96687    1.887998       1.23      14.89
-------------+--------------------------------------------------------
 enep_others |       719    3.129583    7.843682          0       69.3
       enep1 |       719    4.395188    3.951399       1.23      57.56
        enpp |       748    3.297714    1.496663          1      10.87
 enpp_others |       737    1.398372    4.881609          0       54.1
       enpp1 |       736    3.391223    1.795634          1      20.94
-------------+--------------------------------------------------------
      enpres |       755    1.158702    1.645361          0       6.57
      medmag |       608    14.28289    31.60129          1        150
      newdem |       761    .1576873    .3646872          0          1
  proximity1 |       761    .2731406    .4074245          0          1
  proximity2 |       761    .2036794    .4029981          0          1
-------------+--------------------------------------------------------
       seats |       754    203.5358    164.3902         11        672
  upperseats |       718    16.80362    48.68097          0        344
   uppertier |       718     6.32078    13.29367          0      77.95
twoelections |       761    .0183968    .1344699          0          1
twoelectio~1 |       761    .0091984    .0955291          0          1
-------------+--------------------------------------------------------
pres_plura~y |       761    .0972405    .2964798          0          1
 pres_runoff |       761    .2299606     .421084          0          1
pres_major~y |       761    .0617608     .240879          0          1
pres_qualm~y |       761    .0459921    .2096058          0          1
    pres_stv |       761           0           0          0          0
-------------+--------------------------------------------------------
pres_college |       761           0           0          0          0

. drop if enep_others>15 & enep_others<100;
(29 observations deleted)

. sum enep1 if pres_runoff==1 & institution==3;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       enep1 |        82    4.752744    2.583826       1.63     14.125

. sum enep1 if pres_plurality==1 & institution==3;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       enep1 |        58    3.148103    1.464485       1.35       8.64

. drop if pres_runoff==0 & pres_plurality==0;
(494 observations deleted)

. ttest enep1 if institution==3, by(pres_runoff) unequal;

Two-sample t test with unequal variances

------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      58    3.148103    .1922963    1.464485    2.763037     3.53317
       1 |      82    4.752744    .2853358    2.583826    4.185015    5.320473
---------+--------------------------------------------------------------------
combined |     140    4.087964    .1963817    2.323619    3.699683    4.476246
---------+--------------------------------------------------------------------
    diff |            -1.60464    .3440849               -2.285253   -.9240283
------------------------------------------------------------------------------
Satterthwaite's degrees of freedom:  132.458

                      Ho: mean(0) - mean(1) = diff = 0

     Ha: diff < 0               Ha: diff != 0              Ha: diff > 0
       t =  -4.6635                t =  -4.6635              t =  -4.6635
   P < t =   0.0000          P > |t| =   0.0000          P > t =   1.0000

. *     ****************************************************************  *;
. *       Can easily see that the effective number of electoral parties   *;
. *       is significantly lower in plurality systems compared to runoff  *;
. *       systems.                                                        *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *                                   THE END                             *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. exit;

end of do-file

.        log close
       log:  C:\DATA\electoral_enep.log
  log type:  text
 closed on:  18 May 2005, 10:27:14
------------------------------------------------------------------------------------------------------
